

<%@ page import="org.tailor.Client" %>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="main" />
  <g:set var="entityName" value="${message(code: 'client.label', default: 'Client')}" />
  <title><g:message code="default.create.label" args="[entityName]" /></title>
</head>
<body>
  <div class="nav">
    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
    <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
  </div>
  <div class="body">
    <h1><g:message code="default.create.label" args="[entityName]" /></h1>
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${clientInstance}">
      <div class="errors">
        <g:renderErrors bean="${clientInstance}" as="list" />
      </div>
    </g:hasErrors>
    <g:form action="save" >
      <div class="dialog">
        <table>
          <tbody>

            <tr class="prop">
              <td valign="top" class="name">
                <label for="account"><g:message code="client.account.label" default="Account" /></label>
              </td>
              <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'account', 'errors')}">
          <g:textField name="account"  value="${clientInstance?.account}" />
          </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="password"><g:message code="client.password.label" default="Password" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'password', 'errors')}">
          <g:textField name="password"  value="${clientInstance?.password}" />
          </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="fullName"><g:message code="client.fullName.label" default="Full Name" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'fullName', 'errors')}">
          <g:textField name="fullName"  value="${clientInstance?.fullName}" />
          </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="activationKey"><g:message code="client.activationKey.label" default="Activation Key" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'activationKey', 'errors')}">
          <g:textField name="activationKey"  value="${clientInstance?.activationKey}" />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="address"><g:message code="client.address.label" default="Address" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'address', 'errors')}">
          <g:textField name="address"  value="${clientInstance?.address}" />
          </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="country"><g:message code="client.country.label" default="Country" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'country', 'errors')}">
          <g:textField name="country"  value="${clientInstance?.country}" />
          </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="email"><g:message code="client.email.label" default="Email" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'email', 'errors')}">
          <g:textField name="email"  value="${clientInstance?.email}" />
          </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="phone"><g:message code="client.phone.label" default="Phone" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'phone', 'errors')}">
          <g:textField name="phone" value="${fieldValue(bean: clientInstance, field: 'phone')}" />
          </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="postalCode"><g:message code="client.postalCode.label" default="Postal Code" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'postalCode', 'errors')}">
          <g:textField name="postalCode" value="${fieldValue(bean: clientInstance, field: 'postalCode')}" />
          </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="cardExMo"><g:message code="client.cardExMo.label" default="Card Ex Mo" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'cardExMo', 'errors')}">
          <g:select name="cardExMo" from="${clientInstance.constraints.cardExMo.inList}" value="${fieldValue(bean: clientInstance, field: 'cardExMo')}" valueMessagePrefix="client.cardExMo"  />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="cardExYr"><g:message code="client.cardExYr.label" default="Card Ex Yr" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'cardExYr', 'errors')}">
          <g:select name="cardExYr" from="${clientInstance.constraints.cardExYr.inList}" value="${fieldValue(bean: clientInstance, field: 'cardExYr')}" valueMessagePrefix="client.cardExYr"  />
          </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="creditCard"><g:message code="client.creditCard.label" default="Credit Card" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'creditCard', 'errors')}">
          <g:textField name="creditCard" value="${fieldValue(bean: clientInstance, field: 'creditCard')}" />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="creditCardType"><g:message code="client.creditCardType.label" default="Credit Card Type" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: clientInstance, field: 'creditCardType', 'errors')}">
          <g:textField name="creditCardType" value="${fieldValue(bean: clientInstance, field: 'creditCardType')}" />
          </td>
          </tr>
          </tbody>
        </table>
      </div>
      <div class="buttons">
        <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
      </div>
    </g:form>
  </div>
</body>
</html>
